package com.huike.controller.system;

import com.huike.dto.SysMenuPageQueryDTO;
import com.huike.dto.SysPageQueryDTO;
import com.huike.result.PageResult;
import com.huike.result.Result;
import com.huike.service.system.SysMenuService;
import com.huike.vo.SysMenuVO;
import com.huike.vo.SysMenupermsVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("system/menu/")
public class SysMenuController {
    @Autowired
    private SysMenuService sysMenuService;

    /**
     * 菜单分页查询
     * @param queryDTO
     * @return
     */
    @GetMapping("list")
    public Result<List<SysMenuVO>> list(SysMenuPageQueryDTO queryDTO)
    {

        return sysMenuService.MenuPage(queryDTO);
    }
    /**
     *查询菜单权限列表
     */
    @GetMapping("treeselect")
    public Result<List<SysMenupermsVO>> list( )
    {

        return sysMenuService.MenuPerms();
    }
}
